from datetime import datetime
from applications.extensions import db

# 情绪课程信息
class CourseInfo(db.Model):
    __tablename__ = 'COURSE_INFO'
    course_id = db.Column(db.Integer, primary_key=True, comment='情绪课程id')
    course_name = db.Column(db.String(765), comment='情绪课程名称')
    course_icon = db.Column(db.LargeBinary, comment='课程图标')
    course_detail = db.Column(db.String(255), comment='课程细节')
    course_type = db.Column(db.String(255), comment='课程类型')
    video_path = db.Column(db.String(255), comment='视频地址')
    icon_path = db.Column(db.String(255), comment='课程图标地址')

# 心理课程
class CourseInfoMen(db.Model):
    __tablename__ = 'course_info_men'
    course_id = db.Column(db.Integer, primary_key=True, comment='心理课程id')
    course_name = db.Column(db.String(765), comment='心理课程名称')
    course_icon = db.Column(db.LargeBinary, comment='课程图标')
    course_detail = db.Column(db.String(255), comment='课程细节')
    course_type = db.Column(db.String(255), comment='课程类型')
    video_path = db.Column(db.String(255), comment='视频地址')
    icon_path = db.Column(db.String(255), comment='课程图标地址')

# 动作反应训练课程
class CourseActionResponse(db.Model):
    __tablename__ = 'course_actionresponse'
    course_id = db.Column(db.Integer, primary_key=True, comment='动作反应训练课程id')
    course_name = db.Column(db.String(765), comment='动作反应训练课程名称')
    course_icon = db.Column(db.LargeBinary, comment='课程图标')
    course_description = db.Column(db.String(255), comment='课程细节')
    course_length = db.Column(db.Integer, comment='课程视频长度(ms)')
    course_loadtime = db.Column(db.DateTime, default=datetime.now, comment='创建课程时间')
    course_updatetime = db.Column(db.DateTime, default=datetime.now, comment='更新课程时间')
    course_path = db.Column(db.String(255), comment='视频地址')
    icon_path = db.Column(db.String(255), comment='课程图标地址')
    del_flag = db.Column(db.String(255), comment='动作标准课程删除标志，0为未删除，1为删除')

# 动作标准训练课程
class CourseStandard(db.Model):
    __tablename__ = 'course_standard'
    course_id = db.Column(db.Integer, primary_key=True, comment='动作标准课程id')
    course_name = db.Column(db.String(765), comment='动作标准课程名称')
    course_icon = db.Column(db.LargeBinary, comment='课程图标')
    course_description = db.Column(db.String(255), comment='课程细节')
    course_loadtime = db.Column(db.DateTime, default=datetime.now, comment='创建课程时间')
    course_updatetime = db.Column(db.DateTime, default=datetime.now, comment='更新课程时间')
    icon_path = db.Column(db.String(255), comment='课程图标地址')
    del_flag = db.Column(db.Integer, comment='动作标准课程删除标志，0为未删除，1为删除')